import http from './http.js'

const categories = (pageNumber,pageSize,categoryLevel,parentId) => {
  return http.get('/categories',{
    params:{
      pageNumber,
      pageSize,
      categoryLevel,
      parentId
    }
  })
}

const categoriesAdd = (categoryLevel,categoryName,categoryRank,parentId) => {
  return http.post('/categories',{
    categoryLevel,
    categoryName,
    categoryRank,
    parentId
  })
}

export default{
  categories,
  categoriesAdd
}